package com.mulanweb.api.module.controller;

import com.jfinal.plugin.activerecord.Page;
import com.mulanweb.api.module.model.CarBrand;
import com.mulanweb.api.module.model.City;
import com.mulanweb.db.common.SQLGenerateHelper;
import com.mulanweb.validator.annotation.ValidateFile;
import com.mulanweb.validator.annotation.ValidateForm;

/**
 * Created by Administrator on 2016/8/19.
 */
public class CarBrandController extends BaseController {

    public void search() {
        SQLGenerateHelper helper = new SQLGenerateHelper("car_brand", "name desc");
        helper.addEqualsCondition("name", getPara("name"));
        Page<CarBrand> page = CarBrand.dao.paginate(1, 200, helper.getSqlSelect(), helper.getSqlExceptSelect(), helper.getQueryParas());
        returnPageModelJson(page);
    }
}
